﻿using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using LTJ.Common;
using LTJ.Entity;
using LTJ.FrameWork;
using LTJ.Web.UI;

namespace uswinweb.datacontrol
{
    public partial class add_pop_shipcompList : BaseWebControl
    {
        protected string parpms = LTJ.Common.Utils.UrlDecode(SASRequest.GetString("parms").Trim());
        protected string search_txt_name = SASRequest.GetString("search_txt_name").Trim();
        protected string search_txt_ename = SASRequest.GetString("search_txt_ename").Trim();
        protected string shipcompcode = SASRequest.GetString("shipcompcode");
        protected int cid = SASRequest.GetInt("cid", 0);
        private string strWhere = "";
        private string orderstr = " order by ename asc ";

        public override void ShowUserControl()
        {
            showdiv = "shipcompdata";
            strWhere = BaseDatas.GetBaseDataCondation("carrier", compid, search_txt_name, search_txt_ename, shipcompcode, DataMode.BoatCarr);
            RowsCount = BaseDatas.GetBaseDataCount(strWhere);
            dataDT = BaseDatas.GetBaseDataByPage(PageIndex, PageSize, strWhere, orderstr);
            if (cid > 0) GetPageList("cid=" + cid + "&search_txt_ename=" + search_txt_ename + "&search_txt_name=" + search_txt_name + "&parms=" + parpms);
            else GetPageList("search_txt_ename=" + search_txt_ename + "&search_txt_name=" + search_txt_name + "&parms=" + parpms);
        }
    }
}